/*
 * Copyright (c) 2023, 2024,yzc.cn All rights reserved.
 *
 */
package com.by.mq.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>Project: erp-cloud-api - ReturnMQConfig</p>
 * <p>Powered by yzc On 2024-01-18 14:37:57</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
@Configuration
public class ReturnMQConfig {
    @Bean
    public Queue purReturnQueue() {
        return new Queue("purReturnQueue");
    }

    @Bean
    public DirectExchange purReturnExchange() {
        return new DirectExchange("purReturnExchangeRe");
    }

    @Bean
    public Binding bindingPurReturn(Queue purReturnQueue, DirectExchange purReturnExchange) {
        return BindingBuilder.bind(purReturnQueue).to(purReturnExchange).with("purReturn");
    }
}
